package com.jxt.myjxtmanager.utils;
import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

/**
 * Android Toast(吐司)简单封装，且解决了Toast显示时间叠加问题。
 * @author Administrator
 *
 */
public class ToastUtil {

	private static Toast toast=null;
	public static void showToast(Context context,String content){
		if (toast!=null){
			toast.cancel();
		}
		toast= Toast.makeText(context, content, Toast.LENGTH_LONG);
		toast.setGravity(Gravity.CENTER, 0, 0);
		toast.show();
	}
}
